package com.gitee.sop.order.pay.base.wx;

import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

import java.io.IOException;
import java.util.concurrent.TimeUnit;

/**
 * @author Admin
 */
public class OkHttpUtil {

    private static final OkHttpClient mOkHttpClient = new OkHttpClient.Builder().connectTimeout(10L, TimeUnit.SECONDS).writeTimeout(10L, TimeUnit.SECONDS).readTimeout(30L, TimeUnit.SECONDS).build();

    public static Response execute(Request request)
            throws IOException {
        return mOkHttpClient.newCall(request).execute();
    }
}
